#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int main()
{
	int i, T,x, n1 = 0, n2 = 0;
	scanf("%d", &T);
	for (i = 0; i < T; i++) {
		scanf("%d", &x);
		if (x % 2 == 0) n2++;
		else n1++;
	}
	printf("%d %d\n", n1, n2);
	return 0;
}
//5102